Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
alexr00
left a comment
There was a problem hiding this comment.
Please also give the edit button a 4px top margin
src/github/pullRequestOverview.ts
Outdated
| if (selectedBranch) { | ||
| try { | ||
| await this._item.updateBaseBranch(selectedBranch); | ||
| await this._replyMessage(message, {}); |
There was a problem hiding this comment.
@copilot Include the info about the base branch update in the reply message, and handle that reply message in the tsx so that the header updates properly.
There was a problem hiding this comment.
Updated the implementation to include the base branch name in the reply message and handle it in the frontend to update the UI state properly in commit 9465868. The changeBaseBranch method now updates the PR state with the new base branch after receiving the response.
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Added 4px top margin to the edit button via CSS in commit 9465868. |
alexr00
left a comment
There was a problem hiding this comment.
Great, now add the base change timeline event into the timeline events that we always get, and make sure to also include the new timeline event in the ChangeBaseReply.
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Added BaseRefChanged timeline event support in commit 0633130. The event is now:
|
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Changed in commit e8ecac6. The edit icon button has been removed and the base branch itself is now a clickable button when the user has edit permissions. The button has hover and active states to indicate interactivity, using VS Code theme colors for consistency. |
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Updated in commit 4e67eca. The base branch button now:
|
Implementation Plan for Base Branch Editing
UpdatePullRequestmutation withbaseRefNameparameterpullRequestOverview.tspr.change-base-branchcommand handlerchangeBaseBranchmethod with QuickPick for branch selectioncontext.tsxchangeBaseBranchmethod toPRContextclassheader.tsxupdateBaseBranchmethod topullRequestModel.tsbaseproperty toIssueChangeEventinterfaceUpdateIssueResponsetypeEventType.BaseRefChangedto enumBaseRefChangedEventinterface intimelineEvent.tsBaseRefChangedEventinterface tographql.tsBaseRefChangedEventinqueriesShared.gqlutils.tsBaseRefChangedEventViewcomponent intimeline.tsxChangeBaseReplyto include timeline eventsSummary
Successfully implemented the feature to change the base branch of a Pull Request. The base branch is displayed with code styling inside a clickable secondary button (when the user has edit permissions and PR is open) that triggers the branch selection dialog. Timeline events are created to track base branch changes.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.